package com.hex.ds.hdrs.common.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@EnableWebMvc
public class MyWebMvcConfigurerAdapter implements WebMvcConfigurer {

    @Override
    public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
        configurer.ignoreAcceptHeader(true);
        configurer.mediaType("sh", MediaType.APPLICATION_PDF).mediaType("sh", MediaType.APPLICATION_JSON);
        configurer.mediaType("py", MediaType.APPLICATION_PDF).mediaType("py", MediaType.APPLICATION_JSON);
    }

}
